package com.mall.dao;

import com.mall.domain.ItemGoods;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface IGoodsDetailDao {

    @Select("select * from tb_item_goods where goods_id=#{goods_id}")
    ItemGoods findListGoods(@Param("goods_id") Integer goods_id);

    //根据名称搜索商品
    @Select("SELECT * FROM tb_item_goods WHERE goods_name LIKE '%${name}%'  ")
    List<ItemGoods> findItemGoodsByName(@Param("name") String name);
}
